dotbot/dotbot_simulator: add logic to load custom C based control loop function#222
dotbot/dotbot_simulator: add logic to load custom C based control loop function#222aabadie wants to merge 16 commits intoDotBots:mainfrom
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #222 +/- ##
==========================================
- Coverage 69.25% 68.79% -0.47%
==========================================
Files 40 40
Lines 3789 3829 +40
==========================================
+ Hits 2624 2634 +10
- Misses 1165 1195 +30 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Very interesting! Just confirming I understood: with this we can copy/paste the If so, would it make sense to also provide an example C file (and Makefile) in the examples folder? |
The idea is to compile the source that is located in dotbot-firmware (or libs). There's no code to copy. The output library (.so or dylib) can be anywhere. The path to the .so/dylib is set in the simulator configuration file. I indeed plan to provide a helper Makefile or CMake project to compile the library and I'll probably move the .h/.c code in a segger library under DotBot-libs so it can be reused in dotbot-swarmit as well. |
d29227e to
4d7f39e
Compare
a3b4499 to
63ed07e
Compare
…tible with simulator
In simulator_init_state.toml, just add to each robot configuration the option
custom_control_loop_libraryto specify the custom control loop library to use. Example:The control loop is set per robot so each robot in the swarm can use its own control loop library. The default is to use the Python based version already available in the code base.